﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ly1
{
    class Jia : Calculate
    {
        //类中的构造方法 需要两个形参 int num1, int num2
        public Jia(int num1, int num2) : base(num1, num2)/*继承Calculate的构造方法 并把参数传递到Calculate类中*/
        {
        }

        public override void DisplayResult()
        {
            base.DisplayResult();
            Console.WriteLine("结果为"+(Num1+Num2));
        }
    }
}
